//获取应用实例
const app = getApp();
var network = require("../../utils/net.js");
//我的信息
Page({
  data: {
    userInfo: {},
    list: [],
    userMation: {},
  },

  onLoad: function() {
    var _that = this;
    if (wx.getStorageSync(app.userInfoKey)) {
      _that.setData({
        userInfo: wx.getStorageSync(app.userInfoKey)
      });
      network.GET({
        params: {},
        API_URL: "/app/sysUserMation",
        success: (res) => {
          if (res.returnCode == 0) {
            res.bean.userPhoto = app.appStaticUrl + res.bean.userPhoto;
            _that.setData({
              userMation: res.bean
            });
          } else {
            wx.showToast({
              mask: true,//是否显示透明蒙层，防止触摸穿透，默认：false
              title: res.returnMessage,
              icon: 'none',
            });
          }
        }
      })
    }
  },

  toMyMore: function(event) {
    let url = event.currentTarget.dataset.url
    if (url) {
      wx.navigateTo({
        url: url,
      });
    } else {
      wx.showModal({
        title: '提示',
        content: '功能还在开发中....',
      });
    }
  },

})